package net.dgg.zz.credential.warningConfigure.dao;


import net.dgg.zz.credential.warningConfigure.entity.WarningConfigure;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface WarningConfigureDao {
    int deleteByPrimaryKey(Long id);

    int insert(WarningConfigure record);

    int insertSelective(WarningConfigure record);

    WarningConfigure selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(WarningConfigure record);

    int updateByPrimaryKey(WarningConfigure record);

    /*
     * @Author xs
     * @Date 2018-08-13 04:08:51
     * @Description 分页查询预警数据
     * @param map
     * @return List<WarningConfigure>
     */
    List<WarningConfigure> selectWarningConfigByWithPage(Map<String, Object> map);

    /*
     * @Author xs
     * @Date 2018-08-14 09:08:51
     * @Description 根据事业部和类型查询预警配置
     * @param signOrgOd 事业部id
     * @param warningType 类型（资质、证书）
     * @return WarningConfigure
     */
    WarningConfigure selectBySignOrgIdAndWarningType(@Param("signOrgOd") Long signOrgOd, @Param("warningType") String warningType);

    /*
     * @Author zsx
     * @Date 2018-08-16 03:08:09
     * @Description 根据事业部和预警类型更新单个字段
     * @param params
     * @return int
     */
    int updateBySignOrgIdAndWarningType(Map<String, Object> params);

    /*
     * @Author zsx
     * @Date 2018-08-17 09:08:11
     * @Description  根据事业部id和类型查询配置
     * @param null
     * @return null
     */
    Long querySingleWarning(Map<String, Object> params);

    /**
     * 证书总览：资金池预警
     *
     * @param params
     * @return
     */
    List<Map> warningConfigure(Map params);

    /**
     * 资金池查询
     *
     * @param params
     */
    Map warningConfigureByOrgId(Map params);
}